import request from '@/utils/request'
export function createProduct(productVo) {
  return request({
    url:'/store/product/insertProductAndNormAndRelation',
    method:'post',
    data:productVo
  })
}
export function editProduct(product) {
  return request({
    url:'/store/product/updateProduct',
    method:'post',
    data:product
  })
}
export function fetchGoodsTypeList(pageRequest) {
  return request({
    url:'/store/product/getProductTypePage',
    method:'post',
    data:pageRequest
  })
}
export function fetchGoodsTypeAndGoodsList(StoreId) {
  return request({
    url:'/store/product/getProductTypeAndProduct?StoreId='+StoreId,
    method:'get',
  })
}
export function addGoodsType(productType) {
  return request({
    url:'/store/product/insertProductType',
    method:'post',
    data:productType
  })
}
export function EditGoodsType(productType) {
  return request({
    url:'/store/product/updateProductType',
    method:'post',
    data:productType
  })
}
export function deleteGoodsType(ids) {
  return request({
    url:'/store/product/deleteProductType?id='+ids,
    method:'get'
  })
}
export function fetchAllProductNormByStoreId(data) {
  return request({
    url:'/store/productNorm/getAllProductNormByStoreId',
    method:'post',
    data:data
  })
}
export function deleteProductNormByNormGroupId(productNorm) {
  return request({
    url:'/store/productNorm/DeleteProductNorm',
    method:'post',
    data:productNorm
  })
}
export function addProductNorm(productNorm) {
  return request({
    url:'/store/productNorm/InsertProductNorm',
    method:'post',
    data:productNorm
  })
}
export function editProductNorm(productNorm) {
  return request({
    url:'/store/productNorm/UpdateProductNorm',
    method:'post',
    data:productNorm
  })
}
export function fetchGoodsList(pageRequest) {
  return request({
    url:'/store/product/getProductTypeAndProductPage',
    method:'post',
    data:pageRequest
  })
}
export function editGoodsInfo(product) {
  return request({
    url:'/store/product/updateProduct',
    method:'post',
    data:product
  })
}
export function deleteGoodsById(product) {
  return request({
    url:'/store/product/deleteProduct',
    method:'post',
    data:product
  })
}
